Optimal. Leaf size=59 \[ \frac {(a A-b B) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {\sec ^2(c+d x) ((a A+b B) \sin (c+d x)+a B+A b)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2837, 778, 206} \[ \frac {(a A-b B) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {\sec ^2(c+d x) ((a A+b B) \sin (c+d x)+a B+A b)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 778
Rule 2837
Rubi steps
\begin {align*} \int \sec ^3(c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx &=\frac {b^3 \operatorname {Subst}\left (\int \frac {(a+x) \left (A+\frac {B x}{b}\right )}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\sec ^2(c+d x) (A b+a B+(a A+b B) \sin (c+d x))}{2 d}+\frac {(b (a A-b B)) \operatorname {Subst}\left (\int \frac {1}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{2 d}\\ &=\frac {(a A-b B) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {\sec ^2(c+d x) (A b+a B+(a A+b B) \sin (c+d x))}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.22, size = 54, normalized size = 0.92 \[ \frac {(a A-b B) \tanh ^{-1}(\sin (c+d x))+\sec ^2(c+d x) ((a A+b B) \sin (c+d x)+a B+A b)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 92, normalized size = 1.56 \[ \frac {{\left (A a - B b\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (A a - B b\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, B a + 2 \, A b + 2 \, {\left (A a + B b\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.21, size = 84, normalized size = 1.42 \[ \frac {{\left (A a - B b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - {\left (A a - B b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (A a \sin \left (d x + c\right ) + B b \sin \left (d x + c\right ) + B a + A b\right )}}{\sin \left (d x + c\right )^{2} - 1}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.55, size = 129, normalized size = 2.19 \[ \frac {a A \sec \left (d x +c \right ) \tan \left (d x +c \right )}{2 d}+\frac {a A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d}+\frac {a B}{2 d \cos \left (d x +c \right )^{2}}+\frac {A b}{2 d \cos \left (d x +c \right )^{2}}+\frac {B b \left (\sin ^{3}\left (d x +c \right )\right )}{2 d \cos \left (d x +c \right )^{2}}+\frac {b B \sin \left (d x +c \right )}{2 d}-\frac {B b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 78, normalized size = 1.32 \[ \frac {{\left (A a - B b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (A a - B b\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (B a + A b + {\left (A a + B b\right )} \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{2} - 1}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.11, size = 63, normalized size = 1.07 \[ \frac {\mathrm {atanh}\left (\sin \left (c+d\,x\right )\right )\,\left (\frac {A\,a}{2}-\frac {B\,b}{2}\right )}{d}-\frac {\frac {A\,b}{2}+\frac {B\,a}{2}+\sin \left (c+d\,x\right )\,\left (\frac {A\,a}{2}+\frac {B\,b}{2}\right )}{d\,\left ({\sin \left (c+d\,x\right )}^2-1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (A + B \sin {\left (c + d x \right )}\right ) \left (a + b \sin {\left (c + d x \right )}\right ) \sec ^{3}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________